import sys
nfiles = int(sys.argv[1])
if nfiles%6: print "Warning:  input number is expected to be a multiple of 6, foo"
print ' ,',
for x in range(nfiles): 
  print 'placeholder%s,'% x,
print ' '
for x in range(nfiles):
  print 'placeholder%s,'% x,
  for y in range(nfiles):
    print ((x/6 == y/6) and "1," or "2,"),
  print ''